package wordroid.activitys;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import wordroid.database.DataAccess;
import wordroid.model.BookList;
import wordroid.model.WordList;

public class TestList extends ListActivity
{
  private List<Map<String, Object>> getData()
  {
    ArrayList localArrayList1 = new ArrayList();
    ArrayList localArrayList2 = new DataAccess(this).QueryList("BOOKID = '" + DataAccess.bookID + "'", null);
    System.out.println("size:" + localArrayList2.size());
    int i = 0;
    if (i >= localArrayList2.size())
      label71: return localArrayList1;
    HashMap localHashMap = new HashMap();
    localHashMap.put("word_list", "List" + ((WordList)localArrayList2.get(i)).getList());
    localHashMap.put("last_score", "最高正确率: " + ((WordList)localArrayList2.get(i)).getBestScore() + "%");
    if (((WordList)localArrayList2.get(i)).getBestScore().equals(""))
      localHashMap.put("image", Integer.valueOf(17301515));
    while (true)
    {
      localArrayList1.add(localHashMap);
      ++i;
  //    break label71:
      localHashMap.put("image", Integer.valueOf(17301516));
    }
  }

  protected void onCreate(Bundle paramBundle)
  {
    BookList localBookList = (BookList)new DataAccess(this).QueryBook("ID ='" + DataAccess.bookID + "'", null).get(0);
    setTitle("测试-" + localBookList.getName());
    super.onCreate(paramBundle);
    setContentView(2130903058);
  }

  protected void onListItemClick(ListView paramListView, View paramView, int paramInt, long paramLong)
  {
    super.onListItemClick(paramListView, paramView, paramInt, paramLong);
    Intent localIntent = new Intent();
    localIntent.setClass(this, Test.class);
    localIntent.putExtra("wordList", paramInt);
    startActivity(localIntent);
    System.out.println(paramInt);
  }

  protected void onResume()
  {
    super.onResume();
    List localList = getData();
    String[] arrayOfString = new String[3];
    arrayOfString[0] = "word_list";
    arrayOfString[1] = "last_score";
    arrayOfString[2] = "image";
    int[] arrayOfInt = new int[3];
    arrayOfInt[0] = 2131165259;
    arrayOfInt[1] = 2131165260;
    arrayOfInt[2] = 2131165258;
    SimpleAdapter localSimpleAdapter = new SimpleAdapter(this, localList, 2130903059, arrayOfString, arrayOfInt);
    View localView = LayoutInflater.from(this).inflate(2130903043, null);
    getListView().addHeaderView(localView);
    setListAdapter(localSimpleAdapter);
  }
}

/* Location:           E:\Desktop\Android\英语词汇记忆\classes_dex2jar.jar
 * Qualified Name:     wordroid.activitys.TestList
 * JD-Core Version:    0.5.3
 */